package cn.cinz.service;

import cn.cinz.dao.UserMapper;
import cn.cinz.pojo.User;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;
import java.util.Map;

public class UserServiceImpl implements UserService {

    UserMapper userMapper;

    @Autowired
    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }


    @Override
    public User getLogin(String userName, String userPwd, String userPhone) {
        return userMapper.getLogin(userName, userPwd, userPhone);
    }


    @Override
    public int addUser(User user) {
        return userMapper.addUser(user);
    }

    @Override
    public int addQueryUser(String userName, String userPhone) {
        return userMapper.addQueryUser(userName, userPhone);
    }

    @Override
    public User queryUser(int id) {
        return userMapper.queryUser(id);
    }

    @Override
    public int updateUser(User user) {
        return userMapper.updateUser(user);
    }
}
